using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._GeodatabaseAdministration
{
    /// <summary>
    /// <para>Enable Enterprise Geodatabase</para>
    /// <para>Creates geodatabase system tables, stored procedures, functions, and types in an existing database, thereby enabling geodatabase functionality in the database.</para>
    /// <para>在现有数据库中创建地理数据库系统表、存储过程、函数和类型，从而在数据库中启用地理数据库功能。</para>
    /// </summary>    
    [DisplayName("Enable Enterprise Geodatabase")]
    public class EnableEnterpriseGeodatabase : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public EnableEnterpriseGeodatabase()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_input_database">
        /// <para>Input Database Connection</para>
        /// <para>The path and connection file name for the database in which you want to enable geodatabase functionality. You must connect as a user that qualifies as a geodatabase administrator.</para>
        /// <para>要在其中启用地理数据库功能的数据库的路径和连接文件名。您必须以符合地理数据库管理员资格的用户身份进行连接。</para>
        /// </param>
        /// <param name="_authorization_file">
        /// <para>Authorization File</para>
        /// <para><xdoc>
        ///   <para>The path and file name of the keycodes file that was created when ArcGIS Server was authorized. This file is in the \\Program Files\ESRI\License<release#>\sysgen folder on Windows or the /arcgis/server/framework/runtime/.wine/drive_c/Program Files/ESRI/License<release#>/sysgen directory on Linux. If you have not already done so, authorize ArcGIS Server to create this file.</para>
        ///   <para>Copy the keycodes file from the ArcGIS Server machine to a location accessible to the tool.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>授权 ArcGIS Server 时创建的密钥代码文件的路径和文件名。此文件位于 Windows 的 \\Program Files\ESRI\License<release#>\sysgen 文件夹中，或者位于 Linux 上的 /arcgis/server/framework/runtime/.wine/drive_c/Program Files/ESRI/License<release#>/sysgen 目录中。如果尚未执行此操作，请授权 ArcGIS Server 创建此文件。</para>
        ///   <para>将密钥代码文件从 ArcGIS Server 计算机复制到该工具可访问的位置。</para>
        /// </xdoc></para>
        /// </param>
        public EnableEnterpriseGeodatabase(object _input_database, object _authorization_file)
        {
            this._input_database = _input_database;
            this._authorization_file = _authorization_file;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Enable Enterprise Geodatabase";

        public override string CallName => "management.EnableEnterpriseGeodatabase";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_input_database, _authorization_file, _out_workspace];

        /// <summary>
        /// <para>Input Database Connection</para>
        /// <para>The path and connection file name for the database in which you want to enable geodatabase functionality. You must connect as a user that qualifies as a geodatabase administrator.</para>
        /// <para>要在其中启用地理数据库功能的数据库的路径和连接文件名。您必须以符合地理数据库管理员资格的用户身份进行连接。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Database Connection")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _input_database { get; set; }


        /// <summary>
        /// <para>Authorization File</para>
        /// <para><xdoc>
        ///   <para>The path and file name of the keycodes file that was created when ArcGIS Server was authorized. This file is in the \\Program Files\ESRI\License<release#>\sysgen folder on Windows or the /arcgis/server/framework/runtime/.wine/drive_c/Program Files/ESRI/License<release#>/sysgen directory on Linux. If you have not already done so, authorize ArcGIS Server to create this file.</para>
        ///   <para>Copy the keycodes file from the ArcGIS Server machine to a location accessible to the tool.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>授权 ArcGIS Server 时创建的密钥代码文件的路径和文件名。此文件位于 Windows 的 \\Program Files\ESRI\License<release#>\sysgen 文件夹中，或者位于 Linux 上的 /arcgis/server/framework/runtime/.wine/drive_c/Program Files/ESRI/License<release#>/sysgen 目录中。如果尚未执行此操作，请授权 ArcGIS Server 创建此文件。</para>
        ///   <para>将密钥代码文件从 ArcGIS Server 计算机复制到该工具可访问的位置。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Authorization File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _authorization_file { get; set; }


        /// <summary>
        /// <para>Output Workspace</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_workspace { get; set; }


        public EnableEnterpriseGeodatabase SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}